package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.UserBalanceLogMapper;
import com.ruoyi.system.domain.UserBalanceLog;
import com.ruoyi.system.service.IUserBalanceLogService;
import com.ruoyi.common.support.Convert;
import org.springframework.transaction.annotation.Transactional;

/**
 * 用户余额日志 服务层实现
 * 
 * @author ruoyi
 * @date 2019-06-20
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UserBalanceLogServiceImpl implements IUserBalanceLogService 
{
	@Autowired
	private UserBalanceLogMapper userBalanceLogMapper;

	/**
     * 查询用户余额日志信息
     * 
     * @param id 用户余额日志ID
     * @return 用户余额日志信息
     */
    @Override
	public UserBalanceLog selectUserBalanceLogById(Integer id)
	{
	    return userBalanceLogMapper.selectUserBalanceLogById(id);
	}
	
	/**
     * 查询用户余额日志列表
     * 
     * @param userBalanceLog 用户余额日志信息
     * @return 用户余额日志集合
     */
	@Override
	public List<UserBalanceLog> selectUserBalanceLogList(UserBalanceLog userBalanceLog)
	{
	    return userBalanceLogMapper.selectUserBalanceLogList(userBalanceLog);
	}
	
    /**
     * 新增用户余额日志
     * 
     * @param userBalanceLog 用户余额日志信息
     * @return 结果
     */
	@Override
	public int insertUserBalanceLog(UserBalanceLog userBalanceLog)
	{
	    return userBalanceLogMapper.insertUserBalanceLog(userBalanceLog);
	}
	
	/**
     * 修改用户余额日志
     * 
     * @param userBalanceLog 用户余额日志信息
     * @return 结果
     */
	@Override
	public int updateUserBalanceLog(UserBalanceLog userBalanceLog)
	{
	    return userBalanceLogMapper.updateUserBalanceLog(userBalanceLog);
	}

	/**
     * 删除用户余额日志对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteUserBalanceLogByIds(String ids)
	{
		return userBalanceLogMapper.deleteUserBalanceLogByIds(Convert.toStrArray(ids));
	}
	
}
